Among the optical access technologies, the PON technology is promoted by service providers strongly because it reduces the Operation Expense (OPEX).
PONS are mainly categorized into Broadband Passive Optical Network (BPON), Gigabit Passive Optical Network (GPON), and Ethernet Passive Optical Network (EPON). A PON is mainly composed of network entities including an OLT, Optical Network Units (ONUs)/Optical Network Terminals (ONTs), and the like. The network entities communicate with each other by using Time Division Multiplexing (TDM)/Time Division Multiple Access (TDMA). The TDM technology is applied in a downlink direction, namely, in a communication direction from the OLT to the ONUs; and the TDMA technology is applied in an uplink direction, namely, in a communication direction from the ONUs to the OLT.
The fixed network and the mobile network converge gradually, and more multimedia service requirements arise from convergence of the telecom network, broadcast and television network, and computer communication network, the PON technology is phased into the mobile network. In the mobile network, requirements on delay are high. The Institute for Electrical and Electronic Engineers (IEEE) 1588 Precision Timing Protocol (PTP) developed by the IEEE is applied to the existing PON to meet the time synchronization requirement in the mobile network.
From a perspective of the relation between communication devices, the IEEE 1588 PTP classifies the clocks in the network into two types: Master Clock (MC) and Slave Clock (SC). Only one MC is applied in the PTP communication. The best clock in the entire network is a Grandmaster Clock (GMC).
The messages transmitted in the PTP communication include:
a PTP synchronization message (PTP_SYNC_MESSAGE);
a PTP follow-up message (PTP_FOLLOWUP_MESSAGE);
a PTP delay request message (PTP_DELAY_REQ_MESSAGE);
a PTP delay response message (PTP_DELAY_RESP_MESSAGE); and
a PTP management message PTP_MANAGEMENT_MESSAGE.
A method for ensuring time synchronization between the MC and the SC by using PTP message communication in the PON is described as follows.
A prerequisite of the IEEE 1588 PTP is that the communication delay in the uplink direction is symmetrical to the communication delay in the downlink direction in the network. That is, the communication delay from the MC to the SC is equal to the communication delay from the SC to the MC.
FIG. 1 shows transparent transmission of a PTP message in the PON. Assuming that delay1 represents the communication delay in the downlink direction from the MC to the SC and delay2 represents the communication delay in the uplink direction from the SC to the MC, according to the above prerequisite, delay1=delay2.
Td1, Td2, and Td4 represent the communication delays in the downlink direction from MC to OLT, from OLT to ONU/ONT, and from ONU/ONT to SC, respectively. Td4, Td3, and Td1 represent the communication delay in the uplink direction from SC to ONU/ONT, from ONU/ONT to OLT, and from OLT to MC, respectively. In the PON, the logical distance between the OLT and the ONU/ONT has a fixed value, for example, 60 km in the GPON. In this case, the corresponding logical link delay is 600 μs, namely, Td2+Td3=600 μs.
Time offset (O) exists because the startup time of the MC is different from that of the and the oscillator incurs frequency drift. An existing method for calculating the communication delay includes the following steps:
Step S1: The MC sends a PTP_SYNC_MESSAGE to the SC at a time point TM1, and records the time point TM1 as the sending time TM1. The SC receives the PTP_SYNC_MESSAGE at a time point TS1, and records the time point TS1 as the receiving time TS1.
Step S2: The MC sends a PTP_FOLLOWUP_MESSAGE that carries the sending time flag (TM1). According to the PTP_FOLLOWUP_MESSAGE, the SC knows that TS1=TM1+O+delay1=TM1+I+(Td1+Td2+Td4).
Step S3: The SC sends a PTP_DELAY_REQ_MESSAGE to the MC at a time point TS2, and records the time point TS2 as the sending time TS2. The MC receives the PTP_DELAY_REQ_MESSAGE at a time point TM2, and records the time point TM2 as the receiving time TM2. The MC sends a PTP_DELAY_RESP_MESSAGE to the SC at the time point TM2.
Step S4: The SC receives the PTP_DELAY_RESP_MESSAGE at a time point TS3, and knows that TM2=TS2−O+delay2=TS2−O+(Td1+Td3+Td4) according to the recorded TS2 and TM2.
Therefore, according to steps S1-S4, through elimination of clock offset, the transmission delay from the MC to the SC is calculated as:
                    DELAY        =                              [                                          (                                                      TM                    ⁢                                                                                  ⁢                    2                                    -                                      TS                    ⁢                                                                                  ⁢                    2                                                  )                            +                              (                                                      TS                    ⁢                                                                                  ⁢                    1                                    -                                      TM                    ⁢                                                                                  ⁢                    1                                                  )                                      ]                    /          2                                        =                              (                                          Td                ⁢                                                                  ⁢                1                            +                              Td                ⁢                                                                  ⁢                3                            +                              Td                ⁢                                                                  ⁢                4                            +                              Td                ⁢                                                                  ⁢                1                            +                              Td                ⁢                                                                  ⁢                2                            +                              Td                ⁢                                                                  ⁢                4                                      )                    /          2                                        =                              Td            ⁢                                                  ⁢            1                    +                      300            ⁢                                                  ⁢            µs                    +                      Td            ⁢                                                  ⁢            4.                              
In the existing method, because the delay in the uplink direction is not symmetric to the delay in the downlink direction in the PON, the communication delay in the uplink direction is much greater than the communication delay in the downlink direction, namely, Td3 is much greater than Td2. In the existing method, the calculated communication delay from the MC to the is greater than the actual delay between the MC and the SC (the actual delay is Td1+Td2+Td4), and therefore the calculated communication delay is not accurate.